
from django.conf import settings

import re
# 自定义认证后端





def generate_verify_email_url(email):
    """
    :param user: 用户对象
    :return:
    """
    # 1.加密的数据
    data_dict = { "email": email}

    # 2. 进行加密数据

    from utils.secret import SecretOauth
    secret_data = SecretOauth().dumps(data_dict)

    # 3. 返回拼接url
    active_url = settings.EMAIL_ACTIVE_URL + '?token=' + secret_data
    return active_url